﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Jet : MonoBehaviour
{
    public float upForce;
    Vector3 pos;
    private Rigidbody2D rb2d;
    private void Awake()
    {
        rb2d = GetComponent<Rigidbody2D>();
    }
    void Start()
    {
        pos = transform.position;
        rb2d.AddForce(Vector2.up * upForce, ForceMode2D.Impulse);
    }
    private void Update()
    {
        if (rb2d.velocity.y < 5f)
        {
            Destroy(gameObject);
        }
    }
}
